package org.csy.generic.test02.demo02;

/**
 * @author CSY
 * @date 2025 - 03 - 25
 */
public class MainTest {
    public static void main(String[] args) {
        ObjectTest ot = new ObjectTest();
        ot.setData(10);

        Object data = ot.getData();
        //缺点：取值时需要类型转换
        if (data instanceof Integer) {
            Integer i = (Integer) data;
            System.out.println(i);
        }
    }
}
